package com.jin.六大设计原则.里氏替换原则.违背;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

//用来模拟储蓄卡
public class CashCard{
    private Logger logger = LoggerFactory.getLogger(CashCard.class);
    //提现方法
    public String withdrawal(String orderId, BigDecimal amount){
        //模拟支付成功
        logger.info("体现成功，单号：{} 金额{}",orderId,amount);
        //表示成功
        return "0000";
    }

    //充值方法
    public String recharge(String orderId, BigDecimal amount){
        //模拟支付成功
        logger.info("储蓄成功，单号：{} 金额{}",orderId,amount);
        //表示成功
        return "0000";
    }

    //交易流水查询
    public List<String> tradeFlow(){
        logger.info("交易流水查询成功");
        ArrayList<String> tradeList = new ArrayList<String>();
        tradeList.add("100001,100.00");
        tradeList.add("100001,80.00");
        tradeList.add("100001,76.00");
        tradeList.add("100001,126.00");
        return tradeList;
    }
}
